#include "stdafx.h"
#include "snetwork/CreateThread.h"
#include "processlog.h"

namespace Sock
{
    CreateThread *CreateThread::m_instance = NULL;

    Threads::ThreadObject *CreateThread::instance(void*)
    {
        if (m_instance==NULL) {
            m_instance = new CreateThread();
        }
        return m_instance;
    }
    
    CreateThread::CreateThread()
    {
    
    }

    //CreateThread
    int CreateThread::execute(void *parr)
    {
        paramArr *par = (paramArr *) parr; 
        Threads::ThreadObject *tobj = (Threads::ThreadObject*) par->pobj;
        tobj->execute(parr);    
        return 0;
    }
}
